/**
 * This file is part of 1genia trampoline
 * Copyright (C) 2007-2008 1genia (contact@1genia.com)
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of the License.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; see the file COPYING.TXT.  If not,
 * write to the Free Software Foundation, Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301, USA.
 **/
package com.genia.toolbox.config.autoconfiguration.web.spring.command.impl;

import java.io.File;
import java.io.Serializable;

import com.genia.toolbox.config.autoconfiguration.web.spring.command.ConfigurationCommand;

/**
 * Implementation of {@link ConfigurationCommand}.
 */
public class ConfigurationCommandImpl implements ConfigurationCommand,
		Serializable {

	/**
	 * serialization id.
	 */
	private static final long serialVersionUID = 7680327923757477097L;

	/**
	 * the password to verify.
	 */
	private String oldPassword;

	/**
	 * wether to configure mail through JNDI or through manual configuration.
	 */
	private boolean useJndiForMail;

	/**
	 * the jndi name of the mail server.
	 */
	private String mailSessionJNDIName;

	/**
	 * the name of the mail server.
	 */
	private String mailServer;

	/**
	 * the JDBC driver for the database.
	 */
	private String databaseDriver;

	/**
	 * the JDBC url of the database.
	 */
	private String databaseUrl;

	/**
	 * the user login of the database.
	 */
	private String databaseLogin;

	/**
	 * the user password of the database.
	 */
	private String databasePassword;

	/**
	 * whether to activated the encryption of the password into the file.
	 */
	private Boolean encrypted;

	/**
	 * the new password for the configuration.
	 */
	private String newPassword;

	/**
	 * checking the new password for the configuration.
	 */
	private String newPasswordCheck;

	/**
	 * the size of the pool for resources.
	 */
	private int poolMaxSize;

	/**
	 * the directory containing the configuration and used as a base for all
	 * generated files of the application that must go in the filesystem.
	 */
	private File configurationDirectory;

	/**
	 * whether to update the schema when the server starts.
	 */
	private Boolean schemaUpdate;

	/**
	 * getter for the oldPassword property.
	 *
	 * @return the oldPassword
	 */
	public String getOldPassword() {
		return oldPassword;
	}

	/**
	 * setter for the oldPassword property.
	 *
	 * @param oldPassword
	 *            the oldPassword to set
	 */
	public void setOldPassword(String oldPassword) {
		this.oldPassword = oldPassword;
	}

	/**
	 * getter for the useJndiForMail property.
	 *
	 * @return the useJndiForMail
	 */
	public boolean isUseJndiForMail() {
		return useJndiForMail;
	}

	/**
	 * setter for the useJndiForMail property.
	 *
	 * @param useJndiForMail
	 *            the useJndiForMail to set
	 */
	public void setUseJndiForMail(boolean useJndiForMail) {
		this.useJndiForMail = useJndiForMail;
	}



	/**
	 * getter for the mailServer property.
	 *
	 * @return the mailServer
	 */
	public String getMailServer() {
		return mailServer;
	}

	/**
	 * setter for the mailServer property.
	 *
	 * @param mailServer
	 *            the mailServer to set
	 */
	public void setMailServer(String mailServer) {
		this.mailServer = mailServer;
	}

	/**
	 * getter for the mailSessionJNDIName property.
	 *
	 * @return the mailSessionJNDIName
	 */
	public String getMailSessionJNDIName() {
		return mailSessionJNDIName;
	}

	/**
	 * setter for the mailSessionJNDIName property.
	 *
	 * @param mailSessionJNDIName
	 *            the mailSessionJNDIName to set
	 */
	public void setMailSessionJNDIName(String mailSessionJNDIName) {
		this.mailSessionJNDIName = mailSessionJNDIName;
	}

	/**
	 * getter for the databaseDriver property.
	 *
	 * @return the databaseDriver
	 */
	public String getDatabaseDriver() {
		return databaseDriver;
	}

	/**
	 * setter for the databaseDriver property.
	 *
	 * @param databaseDriver
	 *            the databaseDriver to set
	 */
	public void setDatabaseDriver(String databaseDriver) {
		this.databaseDriver = databaseDriver;
	}

	/**
	 * getter for the databasePassword property.
	 *
	 * @return the databasePassword
	 */
	public String getDatabasePassword() {
		return databasePassword;
	}

	/**
	 * setter for the databasePassword property.
	 *
	 * @param databasePassword
	 *            the databasePassword to set
	 */
	public void setDatabasePassword(String databasePassword) {
		this.databasePassword = databasePassword;
	}

	/**
	 * getter for the encrypted property.
	 *
	 * @return the encrypted
	 */
	public Boolean getEncrypted() {
		return encrypted;
	}

	/**
	 * setter for the encrypted property.
	 *
	 * @param encrypted
	 * 			the encrypted to set
	 */
	public void setEncrypted(Boolean encrypted) {
		this.encrypted = encrypted;
	}

	/**
	 * getter for the databaseUrl property.
	 *
	 * @return the databaseUrl
	 */
	public String getDatabaseUrl() {
		return databaseUrl;
	}

	/**
	 * setter for the databaseUrl property.
	 *
	 * @param databaseUrl
	 *            the databaseUrl to set
	 */
	public void setDatabaseUrl(String databaseUrl) {
		this.databaseUrl = databaseUrl;
	}

	/**
	 * getter for the databaseLogin property.
	 *
	 * @return the databaseLogin
	 */
	public String getDatabaseLogin() {
		return databaseLogin;
	}

	/**
	 * setter for the databaseLogin property.
	 *
	 * @param databaseLogin
	 *            the databaseLogin to set
	 */
	public void setDatabaseLogin(String databaseLogin) {
		this.databaseLogin = databaseLogin;
	}

	/**
	 * getter for the newPassword property.
	 *
	 * @return the newPassword
	 */
	public String getNewPassword() {
		return newPassword;
	}

	/**
	 * setter for the newPassword property.
	 *
	 * @param newPassword
	 *            the newPassword to set
	 */
	public void setNewPassword(String newPassword) {
		this.newPassword = newPassword;
	}

	/**
	 * getter for the newPasswordCheck property.
	 *
	 * @return the newPasswordCheck
	 */
	public String getNewPasswordCheck() {
		return newPasswordCheck;
	}

	/**
	 * setter for the newPasswordCheck property.
	 *
	 * @param newPasswordCheck
	 *            the newPasswordCheck to set
	 */
	public void setNewPasswordCheck(String newPasswordCheck) {
		this.newPasswordCheck = newPasswordCheck;
	}

	/**
	 * getter for the configurationDirectory property.
	 *
	 * @return the configurationDirectory
	 */
	public File getConfigurationDirectory() {
		return configurationDirectory;
	}

	/**
	 * setter for the configurationDirectory property.
	 *
	 * @param configurationDirectory
	 *            the configurationDirectory to set
	 */
	public void setConfigurationDirectory(File configurationDirectory) {
		this.configurationDirectory = configurationDirectory;
	}

	/**
	 * getter for the poolMaxSize property.
	 *
	 * @return the poolMaxSize
	 */
	public int getPoolMaxSize() {
		return poolMaxSize;
	}

	/**
	 * setter for the poolMaxSize property.
	 *
	 * @param poolMaxSize
	 *            the poolMaxSize to set
	 */
	public void setPoolMaxSize(int poolMaxSize) {
		this.poolMaxSize = poolMaxSize;
	}

	/**
	 * getter for the schemaUpdate property.
	 *
	 * @return the schemaUpdate
	 */
	public Boolean getSchemaUpdate() {
		return schemaUpdate;
	}

	/**
	 * setter for the schemaUpdate property.
	 *
	 * @param schemaUpdate
	 *            the schemaUpdate to set
	 */
	public void setSchemaUpdate(Boolean schemaUpdate) {
		this.schemaUpdate = schemaUpdate;
	}



}
